<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function say(){
                alert('this is say');
            }
        function Student(name,age,gender){
            var obj=new Object();
            obj.name=name;
            obj.age=age;
            obj.gender=gender;
            // obj.say=function(){
            //     alert('this is say');
            // }
            obj.say=say;
            return obj
        }
        var stu1=Student('lisi',20,'men');
        var stu2=Student('zhangsan',18,'women');
        // stu1.say();
        // stu2.say();
        console.log(stu1.constructor);
        console.log(stu2.constructor);
        console.log(stu1.say==stu2.say);
        console.log(stu1);
        console.log(stu2);
        console.log(stu1==stu2);
    </script>
</head>
<body>
    
</body>
</html>